package com.example.Laboratory.Mapper;


import com.example.Laboratory.Entity.Lab_conditions;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface Lab_conditionsMapper {

    //增加实验室概况
    @Insert("INSERT INTO lab_conditions (lab_conditions_title,lab_conditions_publisher,lab_conditions_time,lab_conditions_text,lab_conditions_name,lab_conditions_type,lab_conditions_unit)" +
            "VALUES(#{lab_conditions_title},#{lab_conditions_publisher},#{lab_conditions_time},#{lab_conditions_text},#{lab_conditions_name},#{lab_conditions_type},#{lab_conditions_unit})")
    int addLab_conditions (Lab_conditions t);


    //删除实验室概况
    @Delete("DELETE FROM lab_conditions WHERE lab_conditions_id=#{lab_conditions_id}")
    int deleteLab_conditions (int lab_conditions_id);


    //查找实验室概况
    @Select("SELECT * FROM lab_conditions ")
    List<Lab_conditions> selectLab_conditions ( );


    //修改实验室概况
    @Update("UPDATE lab_conditions SET lab_conditions_title=#{lab_conditions_title}," +
            "lab_conditions_publisher=#{lab_conditions_publisher},lab_conditions_time=#{lab_conditions_time},lab_conditions_text=#{lab_conditions_text}," +
            "lab_conditions_name=#{lab_conditions_name},lab_conditions_type=#{lab_conditions_type},lab_conditions_unit=#{lab_conditions_unit}" +
            "WHERE lab_conditions_id=#{lab_conditions_id}")
    int updateLab_conditions (Lab_conditions i);


}
